package com.itheima.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

//演示AOP中的切入点表达式
@Slf4j
//@Aspect
@Component
@Order(10)
public class AspectDemo4 {


    //前置通知
    @Before("@annotation(com.itheima.aspect.MyLog) && execution(* com.itheima.service.*.*(..))")
    public void m2(JoinPoint jp) {
        log.info("前置通知:{}", jp.getSignature());
    }


}
